#!/usr/bin/env python
#coding:utf-8
import sys

def workfunc1(filename,filetype):
    print 'script function received args:%s,%s' % (filename,filetype)
    fh=open(filename)
    buffer=fh.read()
    print '%s\n%s\n%s' % ('='*50,buffer,'='*50)
    fh.close()
    print 'workfunc1 done'

def main():
    if len(sys.argv)<2:
        print 'argument error.'
        return -1
    else:
        workfunc1(sys.argv[1],sys.argv[2])

if __name__ == '__main__':
    main()
